package com.cbn.ibcp.jishiting.rms.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.cbn.ibcp.common.annotation.DataSource;
import com.cbn.ibcp.common.enums.DataSourceType;
import com.cbn.ibcp.jishiting.rms.domain.OrgDataSource;
import com.cbn.ibcp.jishiting.rms.mapper.OrgDataSourceMapper;
import com.cbn.ibcp.jishiting.rms.service.IOrgDataSourceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
@RequiredArgsConstructor
public class OrgDataSourceServiceImpl implements IOrgDataSourceService {

    private final OrgDataSourceMapper orgDataSourceMapper;


    @DataSource(DataSourceType.ibcp_rms)
    @Override
    public List<OrgDataSource> getList() {
        return orgDataSourceMapper.selectList(null);
    }
}
